<template>
    <el-row type="flex" class="info-frame">
        <el-col :span="8" class="avater-cont">        
            <img :src="avatar" alt="">
        </el-col>
        <el-col :span="6" class="info-cont">
            <div class="user-info">
                <p><i class="fa fa-user"></i>{{userName}}</p>
                <p><i class="fa fa-cog"></i>{{identity}}</p>
            </div>
        </el-col>
    </el-row>
</template>

<script>
export default {
  name: 'PerInfo',
  data() {
    return {
        
    }
  },
  computed:{
      userName(){
        return this.$store.state.user.userName;
      },
      identity(){
        return this.$store.state.user.identity==="manager"?"管理员":"员工";
      },
      avatar(){
        return this.$store.state.user.avatar;
      }
  }
}
</script>

<style scoped>
.user-info{
    height: 3rem;
    line-height: 1.5rem;
    padding-left: 0.5rem;
    font-size: 0.4rem;
}
.user-info i{
    padding-right: 0.3rem;
}
.avater-cont img{
    border-radius: 100%;
    height: 5rem;
    width: 5rem;
}
.info-frame{
    height: 100%;
}
.avater-cont{
    display: flex;
    background: #fff;
    height: 100%;
    justify-content: center;
    align-items:center;
}
.info-cont{
    background: #Ecebec;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
}
</style>
